package com.lcf.system.manager;

import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.lcf.system.entity.SysTenantUser;
import org.springframework.stereotype.Component;

/**
 * 描述：租户
 *
 * @author lcf
 * @since 2025/3/3 14:10
 */
@Component
public class SysTenantManager {
    /**
     * 用户退出租户
     */
    public void quit(long tenantId, long userId) {
        Db.lambdaUpdate(SysTenantUser.class)
                .eq(SysTenantUser::getTenantId, tenantId)
                .eq(SysTenantUser::getUserId, userId)
                .remove();
    }
}
